const devHost = ''; // 开发
const testHost = devHost; // 测试
const prodHost = ''; // 线上
const prefix = '/api/v4';

const getHostUrl = (urlInfo) => {
  let url = '';
  let appEnv: any = process.env.NODE_ENV;
  appEnv = 'production';
  if (appEnv === 'development') {
    url = devHost + prefix + urlInfo;
  } else if (appEnv === 'test') {
    url = testHost + prefix + urlInfo;
  } else if (appEnv === 'production') {
    url = prodHost + prefix + urlInfo;
  }
  return url;
};

export default getHostUrl;
